package com.kgdev.cweb.beans.i8n.impl;

import java.util.List;

import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.Query;

import com.kgdev.cweb.beans.AbstractEJBBean;
import com.kgdev.cweb.beans.i8n.api.I8nShortBeanLocal;
import com.kgdev.cweb.entities.i8n.I8nShort;
import com.kgdev.cweb.entities.i8n.pkeys.I8nShortPK;

/**
 * Session Bean implementation class ClientRoleBean
 */
@Stateless
@LocalBean
public class I8nShortBean extends AbstractEJBBean<I8nShort, I8nShortPK> implements I8nShortBeanLocal {
	
	public I8nShortBean() {
		super(I8nShort.class);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<I8nShort> findByLanguage(String language) {
		Query query = entityManager.createNamedQuery(entityClass.getSimpleName()
				+ ".findByLanguage");
		query.setParameter("language", language);
		return query.getResultList();
	}

}
